package com.education.wisdom.service.impl;


import com.education.common.utils.Convert;
import com.education.wisdom.mapper.BbsFabulousMapper;
import com.education.wisdom.pojo.BbsFabulous;
import com.education.wisdom.service.IBbsFabulousService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户赞的论坛 服务层实现
 *
 * @author ruoyi
 * @date 2019-06-26
 */
@Service
public class BbsFabulousServiceImpl implements IBbsFabulousService {
    @Autowired
    private BbsFabulousMapper bbsFabulousMapper;

    /**
     * 查询用户赞的论坛信息
     *
     * @param id 用户赞的论坛ID
     * @return 用户赞的论坛信息
     */
    @Override
    public BbsFabulous selectBbsFabulousById(Integer id) {
        return bbsFabulousMapper.selectBbsFabulousById(id);
    }

    /**
     * 查询用户赞的论坛列表
     *
     * @param bbsFabulous 用户赞的论坛信息
     * @return 用户赞的论坛集合
     */
    @Override
    public List<BbsFabulous> selectBbsFabulousList(BbsFabulous bbsFabulous) {
        return bbsFabulousMapper.selectBbsFabulousList(bbsFabulous);
    }

    /**
     * 新增用户赞的论坛
     *
     * @param bbsFabulous 用户赞的论坛信息
     * @return 结果
     */
    @Override
    public int insertBbsFabulous(BbsFabulous bbsFabulous) {
        return bbsFabulousMapper.insertBbsFabulous(bbsFabulous);
    }

    /**
     * 修改用户赞的论坛
     *
     * @param bbsFabulous 用户赞的论坛信息
     * @return 结果
     */
    @Override
    public int updateBbsFabulous(BbsFabulous bbsFabulous) {
        return bbsFabulousMapper.updateBbsFabulous(bbsFabulous);
    }

    /**
     * 删除用户赞的论坛对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBbsFabulousByIds(String ids) {
        return bbsFabulousMapper.deleteBbsFabulousByIds(Convert.toStrArray(ids));
    }

    @Override
    public List<BbsFabulous> selectByBbsId(Integer bbsId) {
        return bbsFabulousMapper.selectByBbsId(bbsId);
    }


}
